
using Infrastructure.Extensions;
using ZR.Model.Enums;

namespace ZR.Model.BaseFrame.Entity
{
    /// <summary>
    /// 用户
    /// </summary>
    public class UserEntityBase
    {
        /// <summary>
        /// 用户标识
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public long UserId { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        public string Account { get; set; }= string.Empty;

        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }= string.Empty;

        /// <summary>
        /// 员工编号
        /// </summary>
        public string EmployeeNo { get; set; }= string.Empty;

        /// <summary>
        /// 部门
        /// </summary>
        public long DepartId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }= string.Empty;

        /// <summary>
        /// 密码键
        /// </summary>
        public string PwdKey { get; set; }= string.Empty;

        /// <summary>
        /// 头像
        /// </summary>
        public string Avatar { get; set; }= string.Empty;

        /// <summary>
        /// 首次登录时间
        /// </summary>
        public DateTime? FirstLoginTime { get; set; }

        /// <summary>
        /// 上次登录时间
        /// </summary>
        public DateTime? PreviousLoginTime { get; set; }

        /// <summary>
        /// 最近登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 登录次数
        /// </summary>
        public int LoginCount { get; set; }

        /// <summary>
        /// 是否在线
        /// </summary>
        public byte IsOnline { get; set; }

        /// <summary>
        /// Web请求token
        /// </summary>
        public string WebToken { get; set; }

        /// <summary>
        /// Api请求token
        /// </summary>
        public string ApiToken { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string Tel { get; set; }= string.Empty;

        /// <summary>
        /// 手机号
        /// </summary>
        public string Mob { get; set; }= string.Empty;

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }= string.Empty;

        /// <summary>
        /// 性别
        /// </summary>
        public string Sex { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birth { get; set; }

        /// <summary>
        /// [QQ]
        /// </summary>
        public string Qq { get; set; }= string.Empty;

        /// <summary>
        /// 公司标识
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 部门路径
        /// </summary>
        public string DepartPath { get; set; }= string.Empty;

        /// <summary>
        /// 是否离职
        /// </summary>
        public byte IsLeave { get; set; }

        /// <summary>
        /// 离职日期
        /// </summary>
        public DateTime? LeaveDate { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creater { get; set; }= string.Empty;

        /// <summary>
        /// 创建人标识
        /// </summary>
        public long CreaterId { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string Modifier { get; set; }

        /// <summary>
        /// 修改人标识
        /// </summary>
        public long? ModifierId { get; set; }

        /// <summary>
        /// 最近密码修改时间
        /// </summary>
        public DateTime? LastPwdModifyTime { get; set; }

        /// <summary>
        /// 最近解锁时间
        /// </summary>
        public DateTime? LastUnlockTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }= string.Empty;

        /// <summary>
        /// 状态
        /// </summary>
        public string StateCode { get; set; } = DataStateEnum.Enabled.ToEnumCode();

    }
}